package utils;

import org.apache.log4j.Logger;
import org.testng.Reporter;


/**
 * Created with IntelliJ IDEA.
 * User: kvasolka
 * Date: 5/29/14
 * Time: 8:27 PM
 * To change this template use File | Settings | File Templates.
 */
public class LoggTest {
    private LoggTest() {}

    private static final Logger LOGGER = Logger.getLogger(String.valueOf(LoggTest.class));

    // ****************** Default message content ********************
    private static final String INFO_LOG = "\"%s\"";
    private static final String WARNING_LOG = "\"%s\"";;
    private static final String ERROR_LOG = "\"%s\" !";

    public static String error (String message)
    {
        LOGGER.error(String.format(ERROR_LOG, message));
        Reporter.log(String.format(ERROR_LOG, message));
        return String.format(ERROR_LOG, message);
    }

    public static String info(String message)
    {
        LOGGER.info(String.format(INFO_LOG, message));
        Reporter.log(String.format(INFO_LOG, message));
        return String.format(INFO_LOG, message);
    }
}
